<?php
include 'Article_model.php';
if(isset($_GET['Article_ID'])&& isset($_GET['name'])&& isset($_GET['email'])&& isset($_GET['content']))
{
    $ArticleID=$_GET['Article_ID'];
    $name=$_GET['name'];
    $email=$_GET['email'];
    $content=$_GET['content'];
    $now = getdate();
    $currentTime = $now["hours"] . ":" . $now["minutes"] . ":" . $now["seconds"];
    $currentDate =   $now["year"]. "-" . $now["mon"] . "-" .$now["mday"] ;
    $createdDate=$currentDate.' '.$currentTime;
    $rs=  InsertComment($content, $name, $email, $createdDate, $ArticleID);
    if($rs>0)
    {
        
        echo '<font color="blue">Bình luận thành công</font>';
    }
    else
        echo '<font color="red">Bình luận không thành công</font>';
}
?>
